The string is assumed to be a file mask, and a NameFilter object is automatically created for the passed string, with FilterScope.File as the default FilterScope.
Each object in the array may be of the types described in this table, and is used accordingly.
Other
If any other type is found, an exception is thrown.
Note that when passing a string, for example "folder", as the folder to retrieve in the filters parameter, a NameFilter class will be created around the string. By default, the FilterScope of the NameFilter class is FilterScope.File. This means that only files will be filter and all folders will be returned.
In order to filter folders, a NameFilter class needs to be constructed around the string and the FilterScope must be set to FilterScope.Folder. For example:
GetFolders( true, new NameFilter( "folder", FilterScope.Folder ) );
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2